package com.itheima.d3_thread_safe;

/**
 * 目标：模拟线程安全问题。
 */
public class ThreadTest {
    public static void main(String[] args) {
        Ticket ticket = new Ticket();
        Thread thread1 = new Thread(ticket, "001");
        Thread thread2 = new Thread(ticket, "002");
        Thread thread3 = new Thread(ticket, "003");
        thread1.start();
        thread2.start();
        thread3.start();

    }


}


